﻿using Microsoft.AspNetCore.Mvc.ModelBinding;

namespace Microsoft.AspNetCore.Mvc;

[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class FromCustomJsonValueAttribute : Attribute, IBindingSourceMetadata
{
    public static readonly BindingSource CustomJsonValue = new BindingSource(
        "CustomJsonValue",
        "BindingSource_CustomJsonValue",
        isGreedy: true,
        isFromRequest: true);

    public BindingSource BindingSource => CustomJsonValue;
}
